<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>Title</title>
</head>
<body>
    <a th:href="@{/xixi}">mercury</a>

111
<!--<label th:class="${#fields.hasErrors('firstName')}? 'error'">First Name</label>-->
    <!--<label th:class="${#fields.hasErrors('userName')}? 'error'">user Name</label>:-->
    <!--<form action="#" th:object="${user}" method="post">
        <input type="text" th:field="*{userName}"/>
    </form>-->
<form th:action="@{/thymeleaf/register}"  th:object="${user}">
   <div>
        <ul>
            <li th:each="err : ${#fields.errors('*')}" th:text="${err}">problem</li>
        </ul>
    </div>
    userName:<input type="text" th:field="*{userName}"/><br/>
    age:<input type="text" th:field="*{age}" /><br/>
    <input type="submit" value="注册" />
</form>
</body>
</html>